<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../template/adminTemp.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns="http://www.w3.org/1999/xhtml">
    <ui:define name="content">
        <section class="grid_6 first">
            <div class="columns">
                <div class="grid_6 first">
                    <h:form prependId="false" styleClass="form panel" id="form">
                        <fieldset>
                            <dl>
                                <dt></dt>
                                <dd><label>Examination's name:</label><p:inputText value="#{examinationManagedBean.examName}" /></dd>
                                <dt></dt>
                                <dd><label>Exam type:</label>
                                    <h:selectOneMenu value="#{examinationManagedBean.examType}">
                                        <f:selectItem itemLabel="Practice" itemValue="1"/>
                                        <f:selectItem itemLabel="Writting" itemValue="0"/>
                                    </h:selectOneMenu>
                                </dd>
                                <dt></dt>
                                <dd><label>Subject:</label>
                                    <h:selectOneMenu value="#{examinationManagedBean.subjectId}">
                                        <f:selectItem itemValue="" itemLabel="choose subject" noSelectionOption="true"/>
                                        <f:selectItems value="#{subjectManagedBean.all}" var="s" itemLabel="#{s.subjectName}" itemValue="#{s.subjectId}"/>
                                    </h:selectOneMenu></dd>
                                <dt></dt>
                                <dd><label>Date exam:</label><p:calendar timeZone="GMT+7" value="#{examinationManagedBean.examDate}" pattern="dd/MM/yyyy"/></dd>
                                <dt></dt>
                                <dd><label>Price to request:</label><h:inputText  value="#{examinationManagedBean.priceToRequest}" label="$"/></dd>
                            </dl>
                        </fieldset>
                        <hr/>
                        <h:commandButton styleClass="button button-blue" style="margin-right: 7px" value="Submit" action="#{examinationManagedBean.add}" />
                        <h:commandButton styleClass="button button-gray" value="Cancel" type="reset"/>
                    </h:form>
                </div>
            </div>
        </section>
    </ui:define>
</ui:composition>
